import Vue from 'vue'
import Router from 'vue-router'
import Layout from '@/components/Layout'
import Recommend from '@/views/Recommend'
import Users from '@/views/Users'
import Game from '@/views/Game'
import Rankings from '@/views/Rankings'
import Administration from '@/views/Administration'
import Login from '@/views/backend/Login'
import Logout from '@/views/backend/Logout'
import Register from '@/views/backend/Register'
import Essential from '@/components/Essential'
import Activity from '@/components/Activity'
import Integral from '@/components/Integral'
import Casual from '@/components/Casual'

Vue.use(Router);

export default new Router({
  linkActiveClass:"my-active",
  mode:'history',
  routes: [
    {
      path: '/',
      name: 'Layout',
      component:Layout,
      children:[
        {
          path: '/',
          name: 'Recommend',
          component:Recommend
        },
        {
          path: '/users',
          name: 'Users',
          component:Users
        },
        {
          path: '/game',
          name: 'Game',
          component:Game
        },
        {
          path: '/rankings',
          name: 'Rankings',
          component:Rankings
        }
      ]
    },
    {
      path: '/administration',
      name: 'Administration',
      component:Administration
    },
    {
      path: '/login',
      name: 'Login',
      component:Login
    },
    {
      path: '/logout',
      name: 'Logout',
      component:Logout
    },
    {
      path: '/register',
      name: 'Register',
      component:Register
    },
    {
      path: '/essential',
      name: 'Essential',
      component:Essential
    },
    {
      path: '/activity',
      name: 'Activity',
      component:Activity
    },
    {
      path: '/integral',
      name: 'Integral',
      component:Integral
    },
    {
      path: '/casual',
      name: 'Casual',
      component:Casual
    }
  ]
})
